Skip to content

feature(hoppscotch): allow resources on default init containers - #69

Merged
nahidhasan94 merged 1 commit into
mainfrom
feat/resource-allocation
Aug 14, 2026
Merged

feature(hoppscotch): allow resources on default init containers#69
nahidhasan94 merged 1 commit into
mainfrom
feat/resource-allocation

Conversation

@nahidhasan94

Copy link
Copy Markdown
Collaborator

Summary

The wait-for-db and wait-for-migrations default init containers didn't set any
CPU/memory resources and couldn't be configured via values. On clusters with a
ResourceQuota that requires requests/limits on every container (standard on OpenShift,
common on hardened Kubernetes), pod admission failed and the chart wouldn't deploy:

Every other container in the chart already exposes resourcesPreset/resources; the
default init containers were the only exception.

Changes

  • Add resourcesPreset and resources to defaultInitContainers.waitForDatabase
    (nano) and defaultInitContainers.waitForMigrations (small).
  • Emit a resources: block in both init containers via hoppscotch.resources, matching
    how the other components do it.
  • waitForMigrations uses the small preset (512Mi) so prisma migrate status has the
    same headroom as the migrations Job; waitForDatabase stays nano (pg_isready).
  • Unit tests for both init containers' default preset and custom overrides; README
    regenerated.

Test plan

  • helm lint + helm unittest pass (init-container suites green)
  • helm template shows resources on both init containers
  • Deploys under a ResourceQuota (verified on OpenShift restricted-v2, AIO + distributed)

@nahidhasan94
nahidhasan94 requested review from mirarifhasan and a lite review from Copilot August 13, 2026 08:33
@nahidhasan94 nahidhasan94 self-assigned this Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Hoppscotch Helm chart so the default init containers (wait-for-db and wait-for-migrations) always have configurable CPU/memory resources via the same resourcesPreset/resources pattern used elsewhere in the chart, improving compatibility with clusters enforcing ResourceQuota requirements.

Changes:

  • Added resourcesPreset + resources values for both default init containers (defaults: nano for DB wait, small for migrations wait).
  • Rendered resources: blocks for both init containers using the shared hoppscotch.resources helper.
  • Added helm-unittest coverage for default preset rendering and explicit resource overrides; regenerated README docs.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
charts/hoppscotch/values.yaml Adds configurable resourcesPreset/resources for both default init containers with sane defaults.
charts/hoppscotch/templates/_default_init_containers.tpl Emits resources: blocks for both init containers via the shared hoppscotch.resources helper.
charts/hoppscotch/tests/default_init_container_wait_for_database_test.yaml Verifies the nano preset resources are applied by default and that explicit overrides win.
charts/hoppscotch/tests/default_init_container_wait_for_migrations_test.yaml Verifies the small preset resources are applied by default and that explicit overrides win.
charts/hoppscotch/README.md Documents the new values (and updates chart/app version badges as part of regeneration).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@nahidhasan94
nahidhasan94 merged commit 8dd22e9 into main Aug 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants